package com.csii.mobilebanking.user;

import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

/**
 * 输入法软键盘控制
 * 
 * @author Administrator
 * 
 */
public class InputMethodMng {

	private Context mContext;
	private View mView;
	private InputMethodManager imm;

	public InputMethodMng(Context context, View view) {
		this.mContext = context;
		this.mView = view;
		imm = (InputMethodManager) mContext
				.getSystemService(Context.INPUT_METHOD_SERVICE);
	}

	// 显示软键盘
	public void show() {
		imm.showSoftInput(mView, 0);
	}

	// 隐藏软键盘
	public void hide() {
		imm.hideSoftInputFromWindow(mView.getWindowToken(), 0);
	}
}
